#include "agent.h"

Agent::Agent()
{
    pS0 = new S0();
    pS1 = new S1();
    pState = pS0;
}

Agent::~Agent()
{
    pState = nullptr;
    delete pS0;
    delete pS1;
}

void Agent::setSelfState(State *p)
{
    pState = p;
}

void Agent::t1()
{
    pState->t1(this);
}

void Agent::t2(string str)
{
    local_str = str;
    pState->t2(this);
}

void Agent::t3(int g)
{
    local_g = g;
    pState->t3(this);
}
